package com.example.travelservlet.likeDynamic.service;

import com.example.travelservlet.entity.Like;
import com.example.travelservlet.entity.LikeDynamic;
import com.example.travelservlet.likeDynamic.dao.LikeDynamicMapper;
import com.example.travelservlet.user.domain.Result;
import com.example.travelservlet.utils.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author hxy
 * @date 2023/5/19 10:05
 */
@Service
public class LikeDynamicService {
    @Autowired
    private LikeDynamicMapper likeDynamicMapper;

    public Integer insertLikeDynamic(LikeDynamic likeDynamic){
        return likeDynamicMapper.insertLikeDynamic(likeDynamic);
    }
    public Integer deleteLikeDynamic(String userId,String dynamicId){
        return likeDynamicMapper.deleteLikeDynamic(userId,dynamicId);
    }

    public List<LikeDynamic> findLikeDynamicByDynamicId(String dynamicId){
        List<LikeDynamic> likeDynamicList = likeDynamicMapper.findLikeDynamicByDynamicId(dynamicId);
        return likeDynamicList;
    }
}
